package com.example.administrator.funchat.Contans;

import android.app.Application;
import android.telephony.TelephonyManager;

import org.xutils.BuildConfig;
import org.xutils.x;

import cn.jpush.android.api.JPushInterface;


/**
 * Created by zxtzx on 2016/7/1.
 */
public class BaseApplication extends Application {
    public static String IMEI;//手机识别码

    @Override
    public void onCreate() {
        super.onCreate();
        TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
        try {
            IMEI = tm.getDeviceId();
        } catch (Exception e) {
            IMEI = (long) (Math.random() * 454567788897l) + "";
        }
        x.Ext.init(this);
        x.Ext.setDebug(BuildConfig.DEBUG);

        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);
        /*JPushInterface.setAlias(this, "123", new TagAliasCallback() {
            @Override
            public void gotResult(int i, String s, Set<String> set) {
                Log.i("push", "gotResult: " + i);
            }
        });*/


    }
}
